/**
 * description: 仿真控制 - 面板控制 (推演版)
 * fileName: simul-panel.ts
 * author: ssr
 * date: 2022-08-11 11:26:13
 * version: V1.0.0
 */
import { defineStore } from "pinia"
import { ref } from "vue"

export interface SimulPanelStateTuiyan {
  // 推演控制
  controlPanelShowTuiyan: boolean
  // 状态栏
  statusPanelShowTuiyan: boolean
  // 实体列表
  entityPanelShowTuiyan: boolean
  // 日志
  logPanelShowTuiyan: boolean
}

export const simulPanelStateTuiyan = defineStore("simul-panel-store-tuiyan", () => {
  const statusPanelShowTuiyan = ref(true)
  const controlPanelShowTuiyan = ref(true)
  const entityPanelShowTuiyan = ref(false)
  const logPanelShowTuiyan = ref(false)

  function setStatusPanelShowTuiyan(flag: boolean) {
    statusPanelShowTuiyan.value = flag
  }

  function setControlPanelShowTuiyan(flag: boolean) {
    controlPanelShowTuiyan.value = flag
  }

  function setEntityPanelShowTuiyan(flag: boolean) {
    entityPanelShowTuiyan.value = flag
  }

  function setLogPanelShowTuiyan(flag: boolean) {
    logPanelShowTuiyan.value = flag
  }

  return {
    statusPanelShowTuiyan,
    controlPanelShowTuiyan,
    entityPanelShowTuiyan,
    logPanelShowTuiyan,
    setStatusPanelShowTuiyan,
    setControlPanelShowTuiyan,
    setEntityPanelShowTuiyan,
    setLogPanelShowTuiyan
  }
})
